debian/rules: Automatically determine which libraries are needed.
authorAaron M. Ucko <ucko@debian.org>
Fri, 5 Aug 2016 03:04:57 +0000 (23:04 -0400)
committerAaron M. Ucko <ucko@debian.org>
Fri, 5 Aug 2016 03:07:41 +0000 (23:07 -0400)
The hand-maintained blacklist was incomplete.

debian/changelog
debian/rules

index 0f032c3b4598d70973de0178082e05522e9157cd..ee54968900cb30f2ff5527711d118b25f1d2923b 100644 (file)
@@ -3,8 +3,10 @@ ncbi-blast+ (2.4.0-2) UNRELEASED; urgency=medium
   * NOT RELEASED YET.
   * Import upstream patch for remaining Boost compatibility issues
     as debian/patches/support_recent_boost.  (Closes: #833451.)
+  * debian/rules: Automatically determine which libraries are needed.
+    (The hand-maintained blacklist was incomplete.)
 
- -- Aaron M. Ucko <ucko@debian.org>  Thu, 04 Aug 2016 23:02:18 -0400
+ -- Aaron M. Ucko <ucko@debian.org>  Thu, 04 Aug 2016 23:04:57 -0400
 
 ncbi-blast+ (2.4.0-1) unstable; urgency=medium
 
index 968ab4f682a954e79a4c16d4ddab3ab00a53d2d8..ae92289c2f54ee985d2436b911f61f63ebaba942 100755 (executable)
@@ -61,7 +61,7 @@ override_dh_auto_test:
 instroot = debian/ncbi-blast+/usr
 leg_bin = debian/ncbi-blast+-legacy/usr/share/ncbi-blast+/bin
 override_dh_auto_install-arch:
-       cp c++/BUILD/lib/*.so $(instroot)/lib/ncbi-blast+/
+       cp c++/BUILD/lib/*.so $(instroot)/lib/ncbi-blast+/
        cp c++/BUILD/bin/*    $(instroot)/bin/
 
 override_dh_auto_install-indep:
@@ -78,8 +78,11 @@ override_dh_install-arch:
 # Clean up tests, demos, and internal build tools
        rm -f $(instroot)/bin/*test* $(instroot)/bin/seqdb_demo \
            $(instroot)/bin/datatool \
-           $(instroot)/bin/project_tree_builder \
-           $(instroot)/lib/ncbi-blast+/libtest_*.so
+           $(instroot)/bin/project_tree_builder
+       for x in $(instroot)/bin/*; do \
+           LD_LIBRARY_PATH=c++/BUILD/lib ldd $$x; \
+       done 2>/dev/null | awk '/BUILD/ { print $$3 }' | sort -u | \
+       xargs cp -v -t $(instroot)/lib/ncbi-blast+
 
 override_dh_install-indep:
        if test -d $(leg_bin); then cp debian/legacy/legacy.sh $(leg_bin)/; fi